package com.jvm123.blog.client;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * @author yawn http://jvm123.com
 * 2019/12/3 9:35
 */
@Component
public class FeignRequestInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate template) {
        String method = template.method();
        String bodyTemplate = template.bodyTemplate();
        System.out.println(method + bodyTemplate);
    }
}
